/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.mes.action.systemadmin;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.mes.mapper.systemadmin.FileAdminMapper;
public class FileAdminAction extends BaseAction
{
    @Autowired(required=false)
	private FileAdminMapper mapper;
    /**
    文件管理
    */
    
    public Map fileManag() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_tree_docs_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_tree_docs=mapper.s_tree_docs(params);
        s_tree_docs = s_tree_docs.buildTree(tb,tb.getPid());
        result.put("s_tree_docs", s_tree_docs);
        
        
        tb = createTreeBean("s_tree_firm_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_tree_firm=mapper.s_tree_firm(params);
        s_tree_firm = s_tree_firm.buildTree(tb,tb.getPid());
        result.put("s_tree_firm", s_tree_firm);
        
        
        tb = createTreeBean("s_menu_pf_treecols");
        tb.setPrefix("img");
        tb.setTableNodeUrl("url");
        SQLList<SQLMap> s_menu_pf=mapper.s_menu_pf(params);
        s_menu_pf = s_menu_pf.buildTree(tb,tb.getPid());
        result.put("s_menu_pf", s_menu_pf);
        
        return result;
    }
    /**
    公司管理文件
    */
    
    public Map companyManagementFIle() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_folder=mapper.s_folder(params);
        result.put("s_folder", s_folder);
        
        
        params.def("CMID9",-1);
        params.def("CMID9",-1);
        SQLList<SQLMap> s_file=mapper.s_file(params,pagination);
        s_file.setPagedListInfo(pagination);
        result.put("s_file", s_file);
        
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_tree_menu=mapper.s_tree_menu(params);
        result.put("s_tree_menu", s_tree_menu);
        
        return result;
    }
    /**
    项目记录格式
    */
    
    public Map qualityRecordFormat() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_process=mapper.s_process(params);
        result.put("s_process", s_process);
        
        return result;
    }
    /**
    记录列表
    */
    
    public Map recordListSystem() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_table=mapper.s_table(params);
        result.put("s_table", s_table);
        
        return result;
    }
    /**
    格式明细
    */
    
    public Map formatDetailsSystem() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_record_table=mapper.s_record_table(params);
        SQLMap s_record_table_emt=s_record_table.getExistfirst();
        result.put("s_record_table", s_record_table_emt);
        
        return result;
    }
    /**
    设备列表
    */
    
    public Map qualityRecordDevList() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> l_product=mapper.l_product(params,pagination);
        l_product.setPagedListInfo(pagination);
        result.put("l_product", l_product);
        
        return result;
    }
    /**
    工序列表
    */
    
    public Map qualityRecordProList() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_pro=mapper.s_pro(params,pagination);
        s_pro.setPagedListInfo(pagination);
        result.put("s_pro", s_pro);
        
        return result;
    }
    /**
    模块记录列表
    */
    
    public Map qualityRecordModularList() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> l_record_work=mapper.l_record_work(params,pagination);
        l_record_work.setPagedListInfo(pagination);
        result.put("l_record_work", l_record_work);
        
        return result;
    }
    /**
    质量记录明细
    */
    
    public Map qualityRecordQualityList() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_record_work=mapper.s_record_work(params);
        SQLMap s_record_work_emt=s_record_work.getExistfirst();
        result.put("s_record_work", s_record_work_emt);
        
        
        SQLList<SQLMap> record=mapper.record(params);
        result.put("record", record);
        
        return result;
    }
    /**
    */
    
    public Map pub_file() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.pub_file(params);
        
        return result;
    }
}